<!DOCTYPE html>
<html lang="en" ng-app="">
<head>
  <meta charset="UTF-8">
  <title>ng事件</title>
  <script src="angular.js"></script>
</head>
<body ng-init="arr=[{name:'ion'}]">
    <input type="text" ng-model="name">
    <input type="button" value="输出" ng-click="arr.unshift({name:name})">
    <ul>
      <li ng-repeat="json in arr">What you input is： {{json.name}}</li>
    </ul>
</body>
</html>